package main.java.com.uycode.lambda;

import main.java.com.uycode.defaultmethods.Convert;

public class Lambda4 {

    static int outerStaticNum;
    int outerNum;

    void testScopes() {
        Convert<Integer, String> stringConvert1 = (from) -> {
            outerNum = 24;
            return String.valueOf(from + outerNum);
        };

        Convert<Integer, String> stringConvert2 = (from) -> {
            outerStaticNum = 24;
            return String.valueOf(from + outerStaticNum);
        };

        System.out.println(stringConvert1.convert(123));
        System.out.println(stringConvert2.convert(123));
    }

    public static void main(String[] args) {
        Lambda4 lambda4 = new Lambda4();
        lambda4.testScopes();
    }


}
